/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.javanile.smal;

import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.CommandLine;

/**
 *
 * @author totalinnovation
 */
public class Compiler {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
		try {
			System.out.println("Smal Compiler v0.0.0");
			CommandLineParser parser = new BasicParser( );
			Options options = new Options( );
			options.addOption("w", "with", true, "Print this usage information");
			options.addOption("h", "help", false, "Print this usage information");
			options.addOption("v", "verbose", false, "Print out VERBOSE information" );
			options.addOption("f", "file", true, "File to save program output to");
			// Parse the program arguments
			CommandLine commandLine = parser.parse( options, args );
			// Set the appropriate variables based on supplied options
			boolean verbose = false;
			String file = "";

			if( commandLine.hasOption('h') ) {
			System.out.println( "Help Message");
			System.exit(0);
			}
			if( commandLine.hasOption('v') ) {
			verbose = true;
			}
			if( commandLine.hasOption('w') ) {
				file = commandLine.getOptionValue('w');
				System.out.println(file);
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
    }
}
